package STUDENT.TRINHQUANGXUANDUC.BASIC.MY_FIRST_JAVA_PROGRAM;

import java.util.Scanner;

public class baitap2 {
	public static void main(String[] args) {
		Double slide01, slide02, slide03,p, area, peri;
		System.out.println("Moi nhap cheu dai canh 1:");
		Scanner sc = new Scanner(System.in);
		slide01 = sc.nextDouble();
		System.out.println("Moi nhap chieu dai canh 2:");
		slide02 = sc.nextDouble();
		System.out.println("Moi nhap chieu dai canh 3:");
		slide03 = sc.nextDouble();
		p =(slide01+slide02+slide03)/2;
		area = Math.sqrt(p*(p-slide01)* (p-slide02)*(p-slide03));
		peri = slide01+slide02+slide03;
		System.out.println("Chu vi hinh tam giac la: "+area);
		System.out.println("Dien tich hinh tam giac la:" + peri);
	}
}
